<script type="text/javascript">
<? if ($action != 'DELETE_MESSAGE' && !empty($id)): ?>
$(document).ready(function(){
	$.fancybox.showActivity();
	// TODO !!!! WTF?? WHY??
	$.get('http://acp.cms736/curd/view/<?=$name_of_model?>?id=<?=intval($id)?>', function(data){
		$.fancybox({autoDimensions:false, content:data});
	});
});
<? endif; ?>
</script>